BEGIN   {   Fs=" ";
            Width =100
            Shrink = 2
            Maxs=-1000000000; 
            Mins= 1000000000
	    Control=0
        }
/\#/    {   next }
/^[ \t]*$/ { next}
/class/ {   What =$2; print What; next }
        {   if($1 > Maxs) Maxs= $1
	    if($1 < Mins) Mins= $1 }
        {
	    N[What,$2,$3] = $1
	    Attr[What,$2]
	    Max[What,$2]  = -1000000000
	    Min[What,$2]  =  1000000000
        }	
	END     {dump(); print "Max " Maxs " Min " Mins " ratio " int(Maxs/Mins)}

	function dump(    i,tmp,places,a,what,attr,out,n,max,min,show) {
    for(i in N)  {
	split(i,tmp,SUBSEP)
	norms(tmp[1],tmp[2],tmp[3],N[i],places)
    }
    for(a in Attr) {
	out = ""
	split(a,tmp,SUBSEP)
	what = tmp[1]
	attr = tmp[2]
	for(i=0;i<=Width/Shrink;i++)
	    if ((what,attr,i) in places)
		out = out places[what,attr,i]
	    else 
		out = out " "
	delta=((max=Max[what,attr]) - (min=Min[what,attr]))
	show=0
	if (!Control) 
	    show=1
	else 
	    show = Control && delta
	if (show)
	    printf("%10s %5s %5s %25s %20s\n", what,Max[what,attr], delta,attr,"|" out "|")
    }}

function norms(what,attr,range,val,place,score) {
    score = int(Width/Shrink*(val - Mins)/(Maxs - Mins)) 
    place[what,attr,score]=range
    if(score > Max[what,attr]) Max[what,attr]=score
    if(score < Min[what,attr]) Min[what,attr]=score
}